package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.business.query.BidRequestAuditQueryObject;
import cn.wolfcode.p2p.business.domain.BidRequest;
import cn.wolfcode.p2p.business.query.ExpAccountQueryObject;
import com.github.pagehelper.PageInfo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface IBidRequestService {

    //申请借款
    void apply(BidRequest bidRequest);

    PageInfo listForPage(BidRequestAuditQueryObject qo);

    //显示出所有的招标信息
    List<BidRequest> listPublishPendngBidRequests();

    List<BidRequest> listInvestBidRequests();

    //获取借款对象的单条信息
    BidRequest getById(Long id);

    //检查定时发标
    void publishBidRequestCheck();

    //定时发标放入队列中
    void publishBidRequestToQueue();

    //保存审核记录
    void publishAudit(Long id, String remark, Integer state, Date publishTime);

    //马上投标-招标逻辑
    void bid(Long bidRequestId, BigDecimal amount);

    //满标一审审核
    void fullAudit1(Long id, String remark, Integer state);

    //满标二审审核
    void fullAudit2(Long id, String remark, Integer state);

    //前台还款明细-立刻还款
    void returnMoney(Long id);

    //后台发布体验标
    void publishExpBidRequest(BidRequest bidRequest);

    //后台显示所有的体验标管理
    PageInfo listForExpPage(ExpAccountQueryObject qo);
}
